/*
 * Copyright (C) 2015 MC
 * All rights reserved.
 *
 * $$File: $$
 * $$DateTime: $$
 * $$Author: $$
 * $$Revision: $$
 */

package com.glela.common.util;

/**
 * @author liujie
 */
public class MediaUtils
{
	public static String[] VIDE = new String[] { "flv", "rvmb", "mp4", "avi", "wmv" };
	public static String[] IMG = new String[] { "gif", "jpg", "jpeg", "png", "wmv" };

	public static boolean checkVideoType(String videoType)
	{
		if (StringUtil.isNotEmpty(videoType)) {
			videoType = videoType.toLowerCase();
			for (String tmp : VIDE) {
				if (tmp.equals(videoType)) {
					return true;
				}
			}
		}
		return false;

	}

	public static boolean checkImgType(String videoType)
	{
		if (StringUtil.isNotEmpty(videoType)) {
			videoType = videoType.toLowerCase();
			for (String tmp : IMG) {
				if (tmp.equals(videoType)) {
					return true;
				}
			}
		}
		return false;
	}
}
